// 请求方法
import request from "../utils/request.js"

export function post(url, data) {
	return new Promise ((resolve, reject) => {
		request.post(url, data).then(res => {
			resolve(res)
		}).catch(err => {
			reject(err)
		})
	})
}

export function get(url, params) {
	return new Promise ((resolve, reject) => {
		request.get(url, params).then(res => {
			resolve(res)
		}).catch(err => {
			reject(err)
		})
	})
}